|
Quaqua 4.4.7 2008-07-16 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.filechooser.FileSystemView
ch.randelshofer.quaqua.filechooser.FileSystemViewFilter
public abstract class FileSystemViewFilter
This is a filter for the FileSystemView provided by the Java VM. The filter can change some of the behaviour of its target FileSystemView.
| Field Summary | |
|---|---|
protected javax.swing.filechooser.FileSystemView |
target
|
| Constructor Summary | |
|---|---|
FileSystemViewFilter()
Creates a new instance. |
|
| Method Summary | |
|---|---|
java.io.File |
createFileObject(java.io.File dir,
java.lang.String filename)
Returns a File object constructed in dir from the given filename. |
java.io.File |
createFileObject(java.lang.String path)
Returns a File object constructed from the given path string. |
java.io.File |
createNewFolder(java.io.File containingDir)
Creates a new folder with a default folder name. |
abstract java.io.File |
getChild(java.io.File parent,
java.lang.String fileName)
|
abstract java.io.File |
getDefaultDirectory()
Return the user's default starting directory for the file chooser. |
java.io.File[] |
getFiles(java.io.File dir,
boolean useFileHiding)
Gets the list of shown (i.e. |
java.io.File |
getHomeDirectory()
|
java.io.File |
getParentDirectory(java.io.File dir)
Returns the parent directory of dir. |
java.io.File[] |
getRoots()
Returns all root partitions on this system. |
abstract java.lang.String |
getSystemDisplayName(java.io.File f)
Name of a file, directory, or folder as it would be displayed in a system file browser. |
abstract javax.swing.Icon |
getSystemIcon(java.io.File f)
Icon for a file, directory, or folder as it would be displayed in a system file browser. |
abstract java.lang.String |
getSystemTypeDescription(java.io.File f)
Type description for a file, directory, or folder as it would be displayed in a system file browser. |
abstract boolean |
isComputerNode(java.io.File dir)
Used by UI classes to decide whether to display a special icon for a computer node, e.g. |
abstract boolean |
isDrive(java.io.File dir)
Used by UI classes to decide whether to display a special icon for drives or partitions, e.g. |
abstract boolean |
isFileSystem(java.io.File f)
Checks if f represents a real directory or file as opposed to a
special folder such as "Desktop". |
abstract boolean |
isFileSystemRoot(java.io.File dir)
Is dir the root of a tree in the file system, such as a drive or partition. |
abstract boolean |
isFloppyDrive(java.io.File dir)
Used by UI classes to decide whether to display a special icon for a floppy disk. |
boolean |
isHiddenFile(java.io.File f)
Returns whether a file is hidden or not. |
abstract boolean |
isParent(java.io.File folder,
java.io.File file)
On Windows, a file can appear in multiple folders, other than its parent directory in the filesystem. |
boolean |
isRoot(java.io.File f)
Determines if the given file is a root in the navigatable tree(s). |
abstract java.lang.Boolean |
isTraversable(java.io.File f)
Returns true if the file (directory) can be visited. |
| Methods inherited from class javax.swing.filechooser.FileSystemView |
|---|
createFileSystemRoot, getFileSystemView |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.swing.filechooser.FileSystemView target
| Constructor Detail |
|---|
public FileSystemViewFilter()
| Method Detail |
|---|
public java.io.File createNewFolder(java.io.File containingDir)
throws java.io.IOException
createNewFolder in class javax.swing.filechooser.FileSystemViewjava.io.IOExceptionpublic boolean isRoot(java.io.File f)
C:\, D:\, etc. Unix has one root,
the "/" directory.
The default implementation gets information from the ShellFolder class.
isRoot in class javax.swing.filechooser.FileSystemViewf - a File object representing a directory
true if f is a root in the navigatable tree.isFileSystemRoot(java.io.File)public abstract java.lang.Boolean isTraversable(java.io.File f)
isTraversable in class javax.swing.filechooser.FileSystemViewf - the File
true if the file/directory can be traversed, otherwise falseJFileChooser.isTraversable(java.io.File),
FileView.isTraversable(java.io.File)public abstract java.lang.String getSystemDisplayName(java.io.File f)
getSystemDisplayName in class javax.swing.filechooser.FileSystemViewf - a File object
JFileChooser.getName(java.io.File)public abstract java.lang.String getSystemTypeDescription(java.io.File f)
getSystemTypeDescription in class javax.swing.filechooser.FileSystemViewf - a File object
JFileChooser.getTypeDescription(java.io.File)public abstract javax.swing.Icon getSystemIcon(java.io.File f)
getSystemIcon in class javax.swing.filechooser.FileSystemViewf - a File object
JFileChooser.getIcon(java.io.File)
public abstract boolean isParent(java.io.File folder,
java.io.File file)
isParent in class javax.swing.filechooser.FileSystemViewfolder - a File object repesenting a directory or special folderfile - a File object
true if folder is a directory or special folder and contains file.
public abstract java.io.File getChild(java.io.File parent,
java.lang.String fileName)
getChild in class javax.swing.filechooser.FileSystemViewparent - a File object repesenting a directory or special folderfileName - a name of a file or folder which exists in parent
new
File(parent, fileName) except when parent and child are both
special folders, in which case the File is a wrapper containing
a ShellFolder object.public abstract boolean isFileSystem(java.io.File f)
f represents a real directory or file as opposed to a
special folder such as "Desktop". Used by UI classes to decide if
a folder is selectable when doing directory choosing.
isFileSystem in class javax.swing.filechooser.FileSystemViewf - a File object
true if f is a real file or directory.public boolean isHiddenFile(java.io.File f)
isHiddenFile in class javax.swing.filechooser.FileSystemViewpublic abstract boolean isFileSystemRoot(java.io.File dir)
isFileSystemRoot in class javax.swing.filechooser.FileSystemViewdir - a File object representing a directory
true if f is a root of a filesystemisRoot(java.io.File)public abstract boolean isDrive(java.io.File dir)
isDrive in class javax.swing.filechooser.FileSystemViewdir - a directory
false alwayspublic abstract boolean isFloppyDrive(java.io.File dir)
isFloppyDrive in class javax.swing.filechooser.FileSystemViewdir - a directory
false alwayspublic abstract boolean isComputerNode(java.io.File dir)
isComputerNode in class javax.swing.filechooser.FileSystemViewdir - a directory
false alwayspublic java.io.File[] getRoots()
getRoots in class javax.swing.filechooser.FileSystemViewpublic java.io.File getHomeDirectory()
getHomeDirectory in class javax.swing.filechooser.FileSystemViewpublic abstract java.io.File getDefaultDirectory()
getDefaultDirectory in class javax.swing.filechooser.FileSystemViewFile object representing the default
starting folder
public java.io.File createFileObject(java.io.File dir,
java.lang.String filename)
createFileObject in class javax.swing.filechooser.FileSystemViewpublic java.io.File createFileObject(java.lang.String path)
createFileObject in class javax.swing.filechooser.FileSystemView
public java.io.File[] getFiles(java.io.File dir,
boolean useFileHiding)
getFiles in class javax.swing.filechooser.FileSystemViewpublic java.io.File getParentDirectory(java.io.File dir)
dir.
getParentDirectory in class javax.swing.filechooser.FileSystemViewdir - the File being queried
dir, or
null if dir is null
|
Copyright 2003-2007 (c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||